package com.gzist.elderlyserviceplatform.entity.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 资讯信息修改接口DTO
 */
@Schema(name = "InfoNewsUpdateDTO", description = "资讯信息修改接口参数")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class InfoNewsUpdateDTO implements Serializable {

    @Schema(accessMode = Schema.AccessMode.READ_ONLY)
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键id")
    private String id;

    @Schema(description = "标题")
    private String title;

    @Schema(description = "简介")
    private String summary;

    @Schema(description = "封面图片")
    private String cover;

    @Schema(description = "资讯内容")
    private String content;

    @Schema(description = "发布时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime publishTime;

    @Schema(description = "分类 ID，关联 info_category 表的 id")
    private String categoryId;
}